home *** CD-ROM | disk | FTP | other *** search
- class classes.misc.Intro
- {
- var clip;
- var clip2;
- var trans;
- var colorTrans;
- var keyListener;
- var reconArray;
- var mainMenu;
- var reconKey;
- var reconIndex;
- var neonVar;
- var c = 0;
- var wheelBot = false;
- var flyBot = false;
- var wheelDoorOpen = false;
- var flyDoorOpen = false;
- var gameStarted = false;
- var f2 = "";
- var mainRoutine = "controlRoom";
- var bro1EnteringShip = false;
- var bro2EnteringShip = false;
- var currentBro = 2;
- var c2 = 0;
- var reconfig = false;
- var Name = "intro";
- function Intro()
- {
- this.clip = _root.attachMovie("introScreen","introScreen",90000);
- this.clip.mainClip.cacheAsBitmap = true;
- this.clip.bro1._visible = false;
- this.clip.bro2._visible = false;
- this.clip2 = _root.attachMovie("introOverlay","introOverlay",110000);
- _root.introBro1 = new classes.bro.IntroBro1(735,468);
- _root.addChar("introBro1");
- _root.introBro2 = new classes.bro.IntroBro2(480,462);
- _root.addChar("introBro2");
- this.trans = new flash.geom.Transform(this.clip.title.neon);
- this.colorTrans = new flash.geom.ColorTransform(1,1,1,1,0,0,0,0);
- this.trans.colorTransform = this.colorTrans;
- _root.starB = new classes.fx.StarB();
- _root.addFX("starB");
- this.keyListener = new Object();
- this.keyListener.onKeyDown = function()
- {
- _root.audio.playLevel5("computerBlip" + (random(16) + 1),_root.randRange(22,28));
- var _loc2_ = Key.getCode();
- if(_root.intro.reconfig)
- {
- _root.intro.sendReconKey(_loc2_,Key.getAscii());
- }
- else if(_loc2_ == 39)
- {
- _root.intro.pressRight();
- }
- else if(_loc2_ == 37)
- {
- _root.intro.pressLeft();
- }
- else if(_loc2_ == 40)
- {
- _root.intro.pressDown();
- }
- else if(_loc2_ == 38)
- {
- _root.intro.pressUp();
- }
- else if(_loc2_ == 13)
- {
- _root.intro.pressEnter();
- }
- };
- Key.addListener(this.keyListener);
- this.reconArray = [38,40,37,39,87,83,65,68];
- this.mainMenu = new Object();
- this.mainMenu.array = new Array();
- this.mainMenu.currentIndex = 0;
- this.mainMenu.focus = "mainM";
- this.mainMenu.startIt = new Object();
- this.mainMenu.options = new Object();
- this.mainMenu.info = new Object();
- this.mainMenu.options.array = new Array();
- this.mainMenu.options.dif = new Object();
- this.mainMenu.options.pass = new Object();
- this.mainMenu.options.exit = new Object();
- this.mainMenu.startIt.highlight = "startH";
- this.mainMenu.options.highlight = "optionsH";
- this.mainMenu.info.highlight = "infoH";
- this.mainMenu.startIt.exec = "startGame";
- this.mainMenu.options.exec = "optionsX";
- this.mainMenu.info.exec = "infoX";
- this.mainMenu.options.dif.highlight = "optionsDifH";
- this.mainMenu.options.pass.highlight = "optionsPassH";
- this.mainMenu.options.exit.highlight = "optionsExitH";
- this.mainMenu.options.dif.exec = "optionsDifX";
- this.mainMenu.options.dif.current = _root.dif.num;
- this.mainMenu.options.pass.exec = "optionsPassX";
- this.mainMenu.options.exit.exec = "optionsExitX";
- this.mainMenu.array.push(this.mainMenu.startIt);
- this.mainMenu.array.push(this.mainMenu.info);
- this.mainMenu.array.push(this.mainMenu.options);
- this.mainMenu.options.array.push(this.mainMenu.options.dif);
- this.mainMenu.options.array.push(this.mainMenu.options.pass);
- this.mainMenu.options.array.push(this.mainMenu.options.exit);
- this.startH();
- this.clip.screen._visible = false;
- this.clip.menu.btStart.enabled = true;
- this.clip.menu.btInfo.enabled = true;
- this.clip.menu.btOptions.enabled = true;
- this.clip.menu.btStart.onRollOver = function()
- {
- _root.intro.startH();
- };
- this.clip.menu.btStart.onPress = function()
- {
- _root.intro.startGame();
- };
- this.clip.menu.btInfo.onRollOver = function()
- {
- _root.intro.infoH();
- };
- this.clip.menu.btInfo.onPress = function()
- {
- _root.intro.infoX();
- };
- this.clip.menu.btOptions.onRollOver = function()
- {
- _root.intro.optionsH();
- };
- this.clip.menu.btOptions.onPress = function()
- {
- _root.intro.optionsX();
- };
- }
- function startH()
- {
- this.mainMenu.currentIndex = 0;
- this.clip.menu.start.gotoAndStop("over");
- this.clip.menu.options.gotoAndStop("off");
- this.clip.menu.info.gotoAndStop("off");
- }
- function optionsH()
- {
- this.mainMenu.currentIndex = 2;
- this.clip.menu.start.gotoAndStop("off");
- this.clip.menu.options.gotoAndStop("over");
- this.clip.menu.info.gotoAndStop("off");
- }
- function infoH()
- {
- this.mainMenu.currentIndex = 1;
- this.clip.menu.start.gotoAndStop("off");
- this.clip.menu.options.gotoAndStop("off");
- this.clip.menu.info.gotoAndStop("over");
- }
- function optionsX()
- {
- this.clip.menu.options.gotoAndStop("on");
- this.clip.title.gotoAndStop(2);
- this.clip.screen.gotoAndStop("options");
- this.clip.screen._visible = true;
- this.clip.menu.btStart.enabled = false;
- this.clip.menu.btInfo.enabled = false;
- this.clip.menu.btOptions.enabled = false;
- this.clip.screen.options.btDif.onRollOver = function()
- {
- _root.intro.optionsDifH();
- };
- this.clip.screen.options.btDif.onPress = function()
- {
- _root.intro.optionsDifX();
- };
- this.clip.screen.options.btPass.onRollOver = function()
- {
- _root.intro.optionsPassH();
- };
- this.clip.screen.options.btPass.onPress = function()
- {
- _root.intro.passPress();
- };
- this.clip.screen.options.btExit.onRollOver = function()
- {
- _root.intro.optionsExitH();
- };
- this.clip.screen.options.btExit.onPress = function()
- {
- _root.intro.optionsExitX();
- };
- this.mainMenu.focus = "options";
- this.mainMenu.options.currentIndex = 0;
- this[this.mainMenu.options.array[this.mainMenu.options.currentIndex].highlight]();
- }
- function passPress()
- {
- Selection.setFocus(this.clip.screen.options.pass.passBox);
- }
- function infoX()
- {
- this.clip.menu.btStart.enabled = false;
- this.clip.menu.btInfo.enabled = false;
- this.clip.menu.btOptions.enabled = false;
- this.clip.menu.info.gotoAndStop("on");
- this.clip.title.gotoAndStop(2);
- this.clip.screen.gotoAndStop("info");
- this.clip.screen._visible = true;
- this.mainMenu.focus = "info";
- this.clip.screen.info.gotoAndStop(this.mainMenu.info.currentFrame);
- }
- function optionsDifH()
- {
- this.mainMenu.options.currentIndex = 0;
- this.mainMenu.options.passHi = false;
- this.clip.screen.options.difficulty._alpha = 100;
- this.clip.screen.options.pass._alpha = 15;
- this.clip.screen.options.exit._alpha = 15;
- this.clip.screen.options.difficulty.choices.gotoAndStop(this.mainMenu.options.dif.current);
- }
- function optionsPassH()
- {
- if(!this.mainMenu.options.passHi)
- {
- this.mainMenu.options.currentIndex = 1;
- this.mainMenu.options.passHi = true;
- this.clip.screen.options.difficulty._alpha = 15;
- this.clip.screen.options.pass._alpha = 100;
- this.clip.screen.options.exit._alpha = 15;
- Selection.setFocus(this.clip.screen.options.pass.passBox);
- this.clip.screen.options.pass.passBox.html = false;
- }
- }
- function optionsExitH()
- {
- this.mainMenu.options.currentIndex = 2;
- this.mainMenu.options.passHi = false;
- this.clip.screen.options.difficulty._alpha = 15;
- this.clip.screen.options.pass._alpha = 15;
- this.clip.screen.options.exit._alpha = 100;
- }
- function optionsDifX()
- {
- var _loc3_ = this.clip.screen.options.difficulty.choices;
- if(this.mainMenu.options.dif.current == 1)
- {
- _loc3_.gotoAndStop(2);
- _root.changeDif("med");
- this.mainMenu.options.dif.current = 2;
- }
- else if(this.mainMenu.options.dif.current == 2)
- {
- _loc3_.gotoAndStop(3);
- _root.changeDif("hard");
- this.mainMenu.options.dif.current = 3;
- }
- else if(this.mainMenu.options.dif.current == 3)
- {
- _loc3_.gotoAndStop(1);
- _root.changeDif("easy");
- this.mainMenu.options.dif.current = 1;
- }
- }
- function optionsPassX()
- {
- var _loc3_ = this.clip.screen.options.pass.passBox.text;
- if(_loc3_ == "super")
- {
- _root.bro1Weapon = "superLaser";
- _root.bro2Weapon = "superLaser";
- _root.audio.playLevel5("computer6",_root.randRange(31,37));
- _root.audio.playLevel2("tagTeam1",20);
- }
- else if(_loc3_ == "golvl2")
- {
- _root.level = 2;
- _root.warp = true;
- _root.subLevelNum = 1;
- _root.bgLevel2();
- _root.coins.num = _root.coins.numT = _root.stats.coins = _root.stats.totalCoins = 175;
- _root.gems.num = _root.gems.numT = _root.stats.gems = _root.stats.totalGems = 15;
- _root.bro1Weapon = "tripleLaserA";
- _root.bro2Weapon = "tripleLaserA";
- _root.audio.playLevel5("computer6",_root.randRange(31,37));
- _root.audio.playLevel2("tagTeam1",20);
- }
- else if(_loc3_ == "golvl3")
- {
- _root.level = 3;
- _root.warp = true;
- _root.bgLevel3();
- _root.coins.num = _root.coins.numT = _root.stats.coins = _root.stats.totalCoins = 350;
- _root.gems.num = _root.gems.numT = _root.stats.gems = _root.stats.totalGems = 20;
- _root.subLevelNum = 1;
- _root.bro1Weapon = "tripleTwistLaser";
- _root.bro2Weapon = "tripleTwistLaser";
- _root.audio.playLevel5("computer6",_root.randRange(31,37));
- _root.audio.playLevel2("tagTeam1",20);
- }
- else if(_loc3_ == "ship2")
- {
- _root.shipPass = true;
- _root.bro1ShipLevel = 2;
- _root.bro2ShipLevel = 2;
- _root.audio.playLevel5("computer6",_root.randRange(31,37));
- _root.audio.playLevel2("tagTeam1",20);
- }
- else if(_loc3_ == "ship3")
- {
- _root.shipPass = true;
- _root.bro1ShipLevel = 3;
- _root.bro2ShipLevel = 3;
- _root.audio.playLevel5("computer6",_root.randRange(31,37));
- _root.audio.playLevel2("tagTeam1",20);
- }
- }
- function optionsExitX()
- {
- this.mainMenu.options.passHi = false;
- this.clip.menu.btStart.enabled = true;
- this.clip.menu.btInfo.enabled = true;
- this.clip.menu.btOptions.enabled = true;
- this.mainMenu.focus = "mainM";
- this[this.mainMenu.array[this.mainMenu.currentIndex].highlight]();
- this.clip.title.gotoAndStop(1);
- this.clip.screen._visible = false;
- }
- function infoExitX()
- {
- this.clip.menu.btStart.enabled = true;
- this.clip.menu.btInfo.enabled = true;
- this.clip.menu.btOptions.enabled = true;
- this.mainMenu.focus = "mainM";
- this[this.mainMenu.array[this.mainMenu.currentIndex].highlight]();
- this.clip.title.gotoAndStop(1);
- this.clip.screen._visible = false;
- }
- function shiftMainMenu(num)
- {
- this.mainMenu.currentIndex += num;
- if(this.mainMenu.currentIndex < 0)
- {
- this.mainMenu.currentIndex = this.mainMenu.array.length - 1;
- }
- if(this.mainMenu.currentIndex == this.mainMenu.array.length)
- {
- this.mainMenu.currentIndex = 0;
- }
- this[this.mainMenu.array[this.mainMenu.currentIndex].highlight]();
- }
- function shiftOptions(num)
- {
- this.mainMenu.options.currentIndex += num;
- if(this.mainMenu.options.currentIndex < 0)
- {
- this.mainMenu.options.currentIndex = this.mainMenu.options.array.length - 1;
- }
- if(this.mainMenu.options.currentIndex == this.mainMenu.options.array.length)
- {
- this.mainMenu.options.currentIndex = 0;
- }
- this[this.mainMenu.options.array[this.mainMenu.options.currentIndex].highlight]();
- }
- function mainM(what)
- {
- if(what == "up")
- {
- this.shiftMainMenu(1);
- }
- if(what == "down")
- {
- this.shiftMainMenu(-1);
- }
- if(what == "enter" || what == "right")
- {
- this[this.mainMenu.array[this.mainMenu.currentIndex].exec]();
- }
- }
- function options(what)
- {
- if(what == "up")
- {
- this.shiftOptions(-1);
- }
- if(what == "down")
- {
- this.shiftOptions(1);
- }
- if(what == "enter" || what == "right")
- {
- this[this.mainMenu.options.array[this.mainMenu.options.currentIndex].exec]();
- }
- if(what == "left")
- {
- this.optionsExitX();
- }
- }
- function info(what)
- {
- if(what == "right")
- {
- if(this.mainMenu.info.currentFrame != this.clip.screen.info._totalframes)
- {
- this.mainMenu.info.currentFrame = this.mainMenu.info.currentFrame + 1;
- this.clip.screen.info.gotoAndStop(this.mainMenu.info.currentFrame);
- }
- }
- if(what == "left")
- {
- if(this.mainMenu.info.currentFrame != 1)
- {
- this.mainMenu.info.currentFrame--;
- this.clip.screen.info.gotoAndStop(this.mainMenu.info.currentFrame);
- }
- else
- {
- this.infoExitX();
- }
- }
- }
- function showConfig()
- {
- var _loc5_ = ["moveU","moveD","moveL","moveR","fireU","fireD","fireL","fireR"];
- var _loc4_ = 0;
- while(_loc4_ < 8)
- {
- var _loc3_ = _root[_loc5_[_loc4_]];
- if(_loc3_ == 38 || _loc3_ == 37 || _loc3_ == 39 || _loc3_ == 40)
- {
- this.clip.screen.info["a" + _loc5_[_loc4_]].gotoAndStop("k" + _loc3_);
- this.clip.screen.info[_loc5_[_loc4_]].text = "";
- }
- else
- {
- this.clip.screen.info["a" + _loc5_[_loc4_]].gotoAndStop(1);
- this.clip.screen.info[_loc5_[_loc4_]].text = chr(_loc3_);
- }
- _loc4_ = _loc4_ + 1;
- }
- }
- function recon(what)
- {
- if(!this.reconfig)
- {
- this.clip.screen.info.switchCredits._alpha = 15;
- this.clip.screen.info.b1.enabled = false;
- this.clip.screen.info.b2.enabled = false;
- this.clip.screen.info.b3.enabled = false;
- this.reconKey = what;
- this.reconfig = true;
- this.clip.screen.info["a" + this.reconKey].gotoAndStop(1);
- this.clip.screen.info[this.reconKey].text = "?";
- var _loc3_ = 0;
- var _loc4_ = this.reconArray.length;
- while(_loc3_ < _loc4_)
- {
- if(this.reconArray[_loc3_] == _root[this.reconKey])
- {
- this.reconArray.splice(_loc3_,1);
- this.reconIndex = _loc3_;
- break;
- }
- _loc3_ = _loc3_ + 1;
- }
- }
- }
- function sendReconKey(code, ascii)
- {
- if(code >= 37 && code <= 40 || code >= 48 && code <= 57 || code >= 65 && code <= 90)
- {
- this.reconfig = false;
- var _loc5_ = 0;
- var _loc7_ = this.reconArray.length;
- while(_loc5_ < _loc7_)
- {
- if(this.reconArray[_loc5_] == code)
- {
- var _loc6_ = _loc5_ >= this.reconIndex ? _loc5_ + 1 : _loc5_;
- this.reconfig = true;
- this.reconArray.splice(this.reconIndex,0,code);
- var _loc4_ = ["moveU","moveD","moveL","moveR","fireU","fireD","fireL","fireR"];
- if(code == 38 || code == 37 || code == 39 || code == 40)
- {
- this.clip.screen.info["a" + _loc4_[this.reconIndex]].gotoAndStop("k" + code);
- this.clip.screen.info[_loc4_[this.reconIndex]].text = "";
- }
- else
- {
- this.clip.screen.info["a" + _loc4_[this.reconIndex]].gotoAndStop(1);
- this.clip.screen.info[_loc4_[this.reconIndex]].text = chr(code);
- }
- _root[this.reconKey] = code;
- this.reconIndex = _loc6_;
- this.reconArray.splice(this.reconIndex,1);
- this.reconKey = _loc4_[this.reconIndex];
- this.clip.screen.info["a" + this.reconKey].gotoAndStop(1);
- this.clip.screen.info[this.reconKey].text = "?";
- break;
- }
- _loc5_ = _loc5_ + 1;
- }
- if(!this.reconfig)
- {
- if(code == 38 || code == 37 || code == 39 || code == 40)
- {
- this.clip.screen.info["a" + this.reconKey].gotoAndStop("k" + code);
- this.clip.screen.info[this.reconKey].text = "";
- }
- else
- {
- this.clip.screen.info["a" + this.reconKey].gotoAndStop(1);
- this.clip.screen.info[this.reconKey].text = chr(code);
- }
- _root[this.reconKey] = code;
- this.reconArray.splice(this.reconIndex,0,code);
- this.clip.screen.info.switchCredits._alpha = 100;
- this.clip.screen.info.b1.enabled = true;
- this.clip.screen.info.b2.enabled = true;
- this.clip.screen.info.b3.enabled = true;
- }
- }
- }
- function switchRecon()
- {
- if(!this.reconfig)
- {
- var _loc3_ = _root.fireU;
- var _loc4_ = _root.fireD;
- var _loc6_ = _root.fireL;
- var _loc5_ = _root.fireR;
- _root.fireU = _root.moveU;
- _root.fireD = _root.moveD;
- _root.fireL = _root.moveL;
- _root.fireR = _root.moveR;
- _root.moveU = _loc3_;
- _root.moveD = _loc4_;
- _root.moveL = _loc6_;
- _root.moveR = _loc5_;
- this.showConfig();
- var _loc7_ = this.reconArray.splice(0,4);
- this.reconArray = this.reconArray.concat(_loc7_);
- }
- }
- function pressRight()
- {
- this[this.mainMenu.focus]("right");
- }
- function pressLeft()
- {
- this[this.mainMenu.focus]("left");
- }
- function pressDown()
- {
- this[this.mainMenu.focus]("down");
- }
- function pressUp()
- {
- this[this.mainMenu.focus]("up");
- }
- function pressEnter()
- {
- this[this.mainMenu.focus]("enter");
- }
- function showHangar()
- {
- _root.aC1.s1.setVolume(75);
- this.clip.removeMovieClip();
- this.clip2.removeMovieClip();
- _root.introBro1.x = 1200;
- _root.introBro2.x = 1050;
- _root.introBroMaskClip.removeMovieClip();
- _root.introBro1.xMov = -5;
- _root.introBro2.xMov = -5;
- _root.introBro1Clip._alpha = 100;
- _root.introBro2Clip._alpha = 100;
- _root.introBro1Clip.setMask(null);
- _root.introBro1.f2 = "";
- _root.introBro2.f2 = "";
- if(this.wheelBot)
- {
- _root.removeChar("wheelBot");
- this.wheelBot = false;
- }
- if(this.flyBot)
- {
- _root.removeChar("flyBot");
- this.flyBot = false;
- }
- _root.introBro1.x = 1250;
- _root.introBro2.x = 1050;
- this.clip = _root.attachMovie("hangar","hangar",90000);
- this.clip.mainClip.bitmap.cacheAsBitmap = true;
- this.mainRoutine = "hangar";
- this.f2 = "waitForShips";
- }
- function startGame()
- {
- _root.initWaveScripts();
- this.clip.menu.btStart.enabled = false;
- this.clip.menu.btInfo.enabled = false;
- this.clip.menu.btOptions.enabled = false;
- this.clip.menu.start.gotoAndStop("on");
- Key.removeListener(this.keyListener);
- this.gameStarted = true;
- _root.introBro1.startGame();
- _root.introBro2.startGame();
- this.f2 = "starting1";
- }
- function startGame2()
- {
- _root.initWaveScripts();
- this.clip.removeMovieClip();
- this.clip2.removeMovieClip();
- _root.removeChar("introBro1");
- _root.removeChar("introBro2");
- _root.introBroMaskClip.removeMovieClip();
- if(this.wheelBot)
- {
- _root.removeChar("wheelBot");
- this.wheelBot = false;
- }
- if(this.flyBot)
- {
- _root.removeChar("flyBot");
- this.flyBot = false;
- }
- if(_root.char == "broShip1")
- {
- _root.broShip1 = new classes.bro.BroShip1(794,196);
- _root.addChar("broShip1");
- }
- else if(_root.char == "broShip2")
- {
- _root.broShip2 = new classes.bro.BroShip2(408,196);
- _root.addChar("broShip2");
- }
- else if(_root.char == "bro1")
- {
- _root.bro1 = new classes.bro.Bro1(408,196);
- _root.addChar("bro1");
- }
- else if(_root.char == "bro2")
- {
- _root.bro2 = new classes.bro.Bro2(408,196);
- _root.addChar("bro2");
- }
- if(_root.char2 == "broShip1")
- {
- _root.broShip1 = new classes.bro.BroShip1(794,196);
- _root.addChar("broShip1");
- }
- else if(_root.char2 == "broShip2")
- {
- _root.broShip2 = new classes.bro.BroShip2(408,196);
- _root.addChar("broShip2");
- }
- else if(_root.char2 == "bro1")
- {
- _root.bro1 = new classes.bro.Bro1(408,196);
- _root.addChar("bro1");
- }
- else if(_root.char2 == "bro2")
- {
- _root.bro2 = new classes.bro.Bro2(408,196);
- _root.addChar("bro2");
- }
- if(_root.char == "broShip1")
- {
- _root.broShip2.action1();
- }
- else
- {
- _root.broShip1.action1();
- }
- _root.game = 1;
- _root.levelInit();
- _root.removeFX("intro");
- _root.starB.stopStars();
- _root.star = new classes.fx.Star();
- _root.addFX("star");
- _root.star.phase2();
- }
- function starting1()
- {
- if(_root.introBro2.x <= 264)
- {
- _root.introBro2.punchOut();
- this.f2 = "starting2";
- }
- }
- function starting2()
- {
- if(_root.introBro1.x <= 310)
- {
- if(!_root.bro1Punch)
- {
- _root.introBro1.wait();
- }
- this.f2 = "starting3";
- }
- }
- function starting3()
- {
- if(_root.introBro1.x <= 264)
- {
- _root.introBro1.punchOut();
- delete _root.bro1Punch;
- this.f2 = "starting4";
- }
- }
- function starting4()
- {
- if(_root.introBro1.x < 50)
- {
- this.showHangar();
- }
- }
- function controlRoom()
- {
- if(random(1000) > 997 && !this.wheelBot && !this.wheelDoorOpen)
- {
- this.wheelBot = true;
- _root.wheelBot = new classes.misc.WheelBot(0,492);
- _root.addChar("wheelBot");
- }
- if(random(1000) > 997 && !this.flyBot)
- {
- this.flyBot = true;
- _root.flyBot = new classes.misc.FlyBot(24,399);
- _root.addChar("flyBot");
- }
- if(Key.isDown(32) && !this.gameStarted)
- {
- this.startGame();
- }
- if(Key.isDown(16) && this.gameStarted)
- {
- this.startGame2();
- }
- this.neonVar += _root.randRange(-35,35);
- if(random(10) > 2)
- {
- this.neonVar = 0;
- }
- this.colorTrans.redOffset = this.neonVar;
- this.colorTrans.greenOffset = this.neonVar;
- this.colorTrans.blueOffset = this.neonVar;
- this.trans.colorTransform = this.colorTrans;
- if(random(100) > 95)
- {
- _root.audio.playLevel5("computerBlip" + (random(16) + 1),_root.randRange(2,8));
- }
- if(random(200) == 199)
- {
- _root.audio.playLevel5("computer" + (random(7) + 2),_root.randRange(2,7));
- }
- }
- function hangar()
- {
- }
- function waitForShips()
- {
- if(_root.introBro1.x <= 612 && !this.bro1EnteringShip)
- {
- this.bro1EnteringShip = true;
- _root.removeChar("introBro1");
- _root.hangar.broShip1.gotoAndPlay("getInShip");
- }
- if(_root.introBro2.x <= 465 && !this.bro2EnteringShip)
- {
- this.bro2EnteringShip = true;
- _root.removeChar("introBro2");
- _root.hangar.broShip2.gotoAndPlay("getInShip");
- }
- }
- function bro1EnteredShip()
- {
- _root.hangar.broShip1.gotoAndStop("main");
- _root.hangar.broShip1.clip.gotoAndStop(2);
- _root.hangar.broShip1B.gotoAndStop("main");
- _root.hangar.broShip1B.clip.gotoAndStop(2);
- this.chooseBro();
- }
- function bro2EnteredShip()
- {
- _root.hangar.broShip2.gotoAndStop("main");
- _root.hangar.broShip2.clip.gotoAndStop(2);
- _root.hangar.broShip2B.gotoAndStop("main");
- _root.hangar.broShip2B.clip.gotoAndStop(2);
- }
- function chooseBro()
- {
- this.f2 = "broChoosing";
- _root.attachMovie("selectArrow","selectArrowClip",90510);
- _root.selectArrowClip._x = 414;
- _root.selectArrowClip._y = 372;
- _root.hangar.broShip2.clip.body.gotoAndStop("faceF");
- }
- function broChoosing()
- {
- if(Key.isDown(37))
- {
- if(this.currentBro == 1)
- {
- _root.selectArrowClip._x = 414;
- this.currentBro = 2;
- _root.audio.playLevel5("buzzSelect",5);
- _root.hangar.broShip2.clip.body.gotoAndStop("faceF");
- _root.hangar.broShip1.clip.body.gotoAndStop("FU");
- }
- }
- if(Key.isDown(39))
- {
- if(this.currentBro == 2)
- {
- _root.selectArrowClip._x = 561;
- this.currentBro = 1;
- _root.audio.playLevel5("zapSelect",5);
- _root.hangar.broShip1.clip.body.gotoAndStop("faceF");
- _root.hangar.broShip2.clip.body.gotoAndStop("FU");
- }
- }
- if(Key.isDown(13))
- {
- _root.selectArrowClip.removeMovieClip();
- _root.char = this.currentBro != 1 ? "broShip2" : "broShip1";
- _root.char2 = this.currentBro != 1 ? "broShip1" : "broShip2";
- _root.hangar.broShip1.clip.body.gotoAndStop("FU");
- _root.hangar.broShip2.clip.body.gotoAndStop("FU");
- this.descend();
- }
- }
- function descend()
- {
- _root.audio.playLevel2("floorDrop",25);
- _root.audio.playLevel1("exitTheme",12,1,0.05);
- _root.hangar.gotoAndPlay("go");
- this.f2 = "descending";
- this.mainRoutine = "";
- _root.star = new classes.fx.Star();
- _root.addFX("star");
- }
- function descending()
- {
- this.c2 = this.c2 + 1;
- if(this.c2 == 60)
- {
- _root.starB.stopStars();
- _root.star.makeStars();
- }
- }
- function controlShip()
- {
- _root.hangar.broShip1._visible = false;
- _root.hangar.broShip2._visible = false;
- _root.broShip1 = new classes.bro.BroShip1(794,202);
- _root.addChar("broShip1");
- _root.broShip2 = new classes.bro.BroShip2(408,202);
- _root.addChar("broShip2");
- if(_root.warp)
- {
- _root[_root.char2].warpLeave();
- }
- else
- {
- _root[_root.char2].action1();
- }
- _root.game = 1;
- }
- function startAction()
- {
- this.clip.removeMovieClip();
- _root.levelInit();
- _root.star.phase2();
- _root.removeFX("intro");
- }
- function main()
- {
- this[this.f2]();
- this[this.mainRoutine]();
- }
- }
-